//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.ScientificWorkflow.ManagementStudioControls.RegistryManagerModule
{
    using System.Windows.Controls;

    /// <summary>
    /// Interaction logic for DataReferenceProviderCenterPane.xaml
    /// </summary>
    public partial class DataReferenceProviderCenterPane : UserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DataReferenceProviderCenterPane"/> class.
        /// </summary>
        public DataReferenceProviderCenterPane()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Handles the ToolTipOpening event of the TextBox control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Controls.ToolTipEventArgs"/> instance containing the event data.</param>
        private void TextBox_ToolTipOpening(object sender, ToolTipEventArgs e)
        {
            TextBox textBox = sender as TextBox;
            if (textBox != null && string.IsNullOrEmpty(textBox.Text))
            {
                e.Handled = true;
            }
        }
    }
}
